package jjn.effective_java.chapter6.item37;

/**
 * @author Jiang Jining
 * @since 2023-04-28 21:23
 */
public class Plant {
    enum LifeStyle {ANNUAL, PERENNIAL, BIENNIAL}
    
    private final String name;
    private final LifeStyle lifeStyle;
    
    Plant(String name, LifeStyle lifeStyle) {
        this.name = name;
        this.lifeStyle = lifeStyle;
    }
    
    public String toString() {
        return name;
    }
    
    public LifeStyle lifeStyle() {
        return lifeStyle;
    }
}
